﻿#第一个GUI界面
from tkinter import *
import tkinter.messagebox as messagebox
class Application(Frame):
	def __init__(self,master = None):
		Frame.__init__(self,master);
		self.pack();
		self.createWidgets()
	
	def createWidgets(self):
		self.helloLabel = Label(self, text='Hello, world!')
		self.helloLabel.pack()
		self.helloInput = Entry(self);
		self.helloInput.pack();
		self.quitButton = Button(self, text='Quit', command=self.hello)
		self.quitButton.pack()
	
	def hello(self):
		messagebox.showinfo("Message","hello")
app = Application();
app.master.title("hello world")
app.mainloop();